import request from '@/utils/request'
// -------- 供应品种 --------
let BASE_ADDRESS = '/tool/loan'

// 分页查询  /tool/loan/list
export const getLoanListApi = (params) =>{
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}

// 添加供应品种 /tool/loan/add
export const getLoanAddApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 修改供应品种 /tool/loan/edit
export const getLoanEditApi = (data) =>{
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "put",
        data
    })
}

// 删除供应品种 /tool/loan/remove/{id}
export const getLoanRemoveApi = (id) =>{
    return request({
        url: `${BASE_ADDRESS}/remove/${id}`,
        method: "delete",
    })
}

// 查询智慧贷款的一级id和二级id /tool/loan/getProjectTypeId
export const getLoanProjectTypeIdApi = () =>{
    return request({
        url: `${BASE_ADDRESS}/getProjectTypeId`,
        method: "get",
    })
}

// -----------查询用户录入的信息-----------

// 查询用户录入的信息 /tool/loanUser/getInfo
export const getInfoLoanUserApi = (params) =>{
    return request({
        url: `/tool/loanUser/getInfo`,
        method: "get",
        params
    })
}

// 查询用户勾选的条件 /tool/loanUser/getConditionIds
export const getConditionIdsloanUserApi = (params) =>{
    return request({
        url: `/tool/loanUser/getConditionIds`,
        method: "get",
        params
    })
}

// 查询用户填写的抵押物 /tool/collateral/list
export const getCollateralListApi = (params) =>{
    return request({
        url: `/tool/collateral/list`,
        method: "get",
        params
    })
}

// 查询用户获取的结果列表 /tool/loanUser/findLoan
export const getLoanUserFindLoanApi = (params) =>{
    return request({
        url: `/tool/loanUser/findLoan`,
        method: "get",
        params
    })
}